namespace YXShop.ExcelLite
{
    using System;

    internal class FormulaFunctionInfo
    {
        private byte argumentsCount;
        private ushort code;
        private string name;
        public const byte VariableArgumentAmountMark = 0xff;

        public FormulaFunctionInfo(ushort code, string name) : this(code, name, 0xff)
        {
        }

        public FormulaFunctionInfo(ushort code, string name, byte argumentsCount)
        {
            this.argumentsCount = 0xff;
            this.code = code;
            this.name = name;
            this.argumentsCount = argumentsCount;
        }

        public byte ArgumentsCount
        {
            get
            {
                return this.argumentsCount;
            }
        }

        public ushort Code
        {
            get
            {
                return this.code;
            }
        }

        public bool IsFixedArgumentCount
        {
            get
            {
                return (this.ArgumentsCount != 0xff);
            }
        }

        public string Name
        {
            get
            {
                return this.name;
            }
        }
    }
}

